package com.example.frescostudy.Adapter;

import android.content.Context;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.frescostudy.Adapter.ViewHolder.FrescoViewHolder;
import com.example.frescostudy.R;
import com.facebook.imagepipeline.core.ImagePipelineConfig;

/**
 * Created by frc on 16-5-27.
 */
public class FrescoAdapter extends RecyclerView.Adapter<FrescoViewHolder> {

    Uri uri = Uri.parse("http://b.hiphotos.baidu.com/image/pic/item/e78.jpg");


    @Override
    public FrescoViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_frsco_recycler_view, parent, false);

        return new FrescoViewHolder(view);
    }

    @Override
    public void onBindViewHolder(FrescoViewHolder holder, int position) {

        holder.simpleDraweeView.setImageURI(uri);
    }

    @Override
    public int getItemCount() {
        return 20;
    }
}
